import request from "@/utils/serviceApiH2";

/* 招聘会页面 */

// 企业参加招聘会
export function jobFairAddCompanyApi(params) {
  return request({
    url: "/apiH2/member/company/jobFire/jobFairAddCompany",
    method: "POST",
    params,
  });
}

// 招聘会列表查询
export function selJobFairListApi(params) {
  return request({
    url: `/apiH2/member/company/jobFire/selJobFairList/`,
    method: "GET",
    params,
    // params: {
    //   page: params.page,
    //   pagesize: params.pagesize,
    //   type: params.type,
    // },
  });
}

// 企业参加招聘会
export function selJobFairByJidAndUidApi(params) {
  return request({
    url: `/apiH2/member/company/jobFire/jobFairAddCompany`,
    method: "POST",
    params,
  });
}

// 企业参加招聘会
export function addJobFairJobApi(data) {
  return request({
    url: "/apiH2/member/company/jobFire/addJobFairJob",
    method: "POST",
    data,
  });
}

// 当前企业发布职位列表查询
export function selPositionListApi(params) {
  return request({
    url: "/apiH2/member/company/jobFire/selPositionList",
    method: "GET",
    params: {
      uid: params,
    },
  });
}

// 根据uid修改招聘会参会职位
export function updateJobFairJobByUidApi(data) {
  return request({
    url: "/apiH2/member/company/jobFire/updateJobFairJobByUid",
    method:'PUT',
    data
  });
}

// 根据uid查询招聘会企业参会职位
export function selJobFairJobByUidApi(params) {
  return request({
    url: `apiH2/member/company/jobFire/selJobFairJobByUid/${params.uid}/${params.jobFairId}`,
    method: "GET",
  });
}


// 根据招聘会id导出企业职位信息
export function exportExcelApi(id) {
  return request({
    url: `/apiH2/admin/excel/apiH2/admin/excel/jobfair/exportExcel/${id}`,
    method: "GET",
  });
}
